<!--
*Author：jxx
 *Contact：283591387@qq.com
 *代码由框架生成,任何更改都可能导致被代码生成器覆盖
 *业务请在@/extension/operationsinfo/operations_sitelist/q_operations_siteList.js此处编写
 -->
<template>
    <view-grid ref="grid"
               :columns="columns"
               :detail="detail"
               :editFormFields="editFormFields"
               :editFormOptions="editFormOptions"
               :searchFormFields="searchFormFields"
               :searchFormOptions="searchFormOptions"
               :table="table"
               :extend="extend">
    </view-grid>
</template>
<script>
    import extend from "@/extension/operationsinfo/operations_sitelist/q_operations_siteList.js";
    import { ref, defineComponent } from "vue";
    export default defineComponent({
        setup() {
            const table = ref({
                key: 'Operations_siteList',
                footer: "Foots",
                cnName: '站点服务维护明细',
                name: 'operations_sitelist/q_operations_siteList',
                url: "/q_operations_siteList/",
                sortName: "Code"
            });
            const editFormFields = ref({"Interval":"","First_operations_time":"","Last_operations_time":"","Remark":""});
            const editFormOptions = ref([[{"title":"维护间隔(天)","required":true,"field":"Interval","type":"number"},
                               {"title":"首次运维时间","required":true,"field":"First_operations_time","type":"date"},
                               {"title":"最近运维时间","field":"Last_operations_time","type":"date"},
                               {"title":"备注","field":"Remark"}]]);
            const searchFormFields = ref({});
            const searchFormOptions = ref([]);
            const columns = ref([{field:'Voucher_sub',title:'单据编码',type:'string',width:120,hidden:true,align:'left'},
                       {field:'Site',title:'站点名称',type:'string',width:110,hidden:true,require:true,align:'left'},
                       {field:'Code',title:'编码',type:'int',width:120,require:true,align:'left',sort:true},
                       {field:'Name',title:'名称',type:'string',width:110,require:true,align:'left'},
                       {field:'Interval',title:'维护间隔(天)',type:'int',width:110,require:true,align:'left'},
                       {field:'First_operations_time',title:'首次运维时间',type:'datetime',width:150,require:true,align:'left',sort:true},
                       {field:'Last_operations_time',title:'最近运维时间',type:'datetime',width:150,align:'left',sort:true},
                       {field:'Operations_siteList',title:'ID',type:'guid',width:110,hidden:true,readonly:true,require:true,align:'left'},
                       {field:'Remark',title:'备注',type:'string',width:220,align:'left'},
                       {field:'Operations_site',title:'父ID',type:'guid',width:110,hidden:true,require:true,align:'left'},
                       {field:'Client_name',title:'客户名称',type:'string',bind:{ key:'无条件客户',data:[]},width:110,hidden:true,require:true,align:'left'},
                       {field:'Operations_contract_sub',title:'运维合同',type:'string',width:110,hidden:true,require:true,align:'left'},
                       {field:'Operations_contract',title:'运维合同ID',type:'guid',width:110,hidden:true,require:true,align:'left'},
                       {field:'Operations_project',title:'运维服务项目ID',type:'guid',width:110,hidden:true,require:true,align:'left'},
                       {field:'lasttime_operations_time',title:'上次运维时间',type:'datetime',width:150,hidden:true,align:'left',sort:true}]);
            const detail = ref({
                cnName: "#detailCnName",
                table: "#detailTable",
                columns: [],
                sortName: "",
                key: ""
            });
            return {
                table,
                extend,
                editFormFields,
                editFormOptions,
                searchFormFields,
                searchFormOptions,
                columns,
                detail,
            };
        },
    });
</script>
